package aoppackage;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class Audience {
	@Before("execution(* aoppackage.Performance.perform(..))")
	public void silenceCellphones(){
		System.out.println("silence cell phone");
	}
	
	@AfterReturning("execution(* aoppackage.Performance.perform(..))")
	public void appause(){
		System.out.println("CLAP CLAP CLAP ");
	}
	
	
	@AfterThrowing("execution(* aoppackage.Performance.perform2(..))")
	public void throwexception(){
		
		System.out.println("thorw exception");
	}
	
	public static addinterface addinter;
	
}
